<?php
$themename = "Awake";
$shortname = "awake";
$page_handle = $shortname . '-options';

//Check WP version
function webtreats_check_wp_version(){
	global $wp_version;
	
	$minium_WP   = '3.0';
	$wp_ok  =  version_compare($wp_version, $minium_WP, '>=');
	
	if ( ($wp_ok == FALSE) ) {
		return false;
	}
	
	return true;
}

//Get Stylesheets into a drop-down list
$styles = array();
if(is_dir(TEMPLATEPATH . "/styles/")) {
	if($open_dirs = opendir(TEMPLATEPATH . "/styles/")) {
		while(($style = readdir($open_dirs)) !== false) {
			if(stristr($style, ".css") !== false) {
				$styles[] = $style;
			}
		}
	}
}
$style_dropdown = sort($styles);

//The Options
$options = array (
		
		
		/* ***************************************** General Setting Options */
		array(	"name" => "General Settings",
			"id" => "generalsettings",
			"type" => "opentab"),
			
		array(	"type" => "table_open"),
		
		array(	"name" => "Style Variation",
			"desc" => "Please select a style variation",
			"id" => "color_scheme",
			"std" => "slate_grey.css",
			"type" => "select",
			"options" => $styles),
			
		array(	"name" => "Custom Logo or Site Title",
			"desc" =>
				array( "Display logo" => "", 
					   "Display site title" => "1"),
			"id" => "site_name",
			"std" => null,
			"type" => "radio",
			'selector' => "selector_logo"),
			
		array(	"name" => "Custom Logo",
			"desc" => "Paste the full URL of your custom logo image here (e.g. http://www.yoursite.com/logo.png)",
			"id" => "custom_logo",
			"std" => null,
			"type" => "text",
			"size" => "70",
			'selected' => "",
			"selected_id" => "id=\"selected_logo\"",
			"selected_class" => "class=\"selected_logo_1\"",
			"selected_option" => "site_name"),
			
		array(	"name" => "Header Contact Info",
			"desc" => "The text you enter here will be displayed above the menu and below the sociables",
			"id" => "header_contact",
			"std" => null,
			"type" => "text",
			"size" => "70"),
			
		array(	"name" => "Custom Favicon",
			"desc" => "Paste the full URL of your custom favicon image here (e.g. http://www.yoursite.com/favicon.ico)",
			"id" => "custom_favicon",
			"std" => null,
			"type" => "text",
			"size" => "70"),
			
		array(	"name" => "Homepage Slider on Every Page?",
			"desc" => "Check this box to enable the homepage slider at the top of every page",
			"id" => "home_slider_page",
			"std" => null,
			"type" => "checkbox"),
		
		array(	"name" => "Header Teaser Text",
			"desc" =>
				array( "Custom" => "customtext", 
					   "Twitter" => "twitter",
					   "Disable" => "disable"),
			"id" => "header_teaser",
			"std" => "customtext",
			"type" => "radio",
			'selector' => "selector_teaser"),
			
		array(	"name" => "Custom Header Teaser Text",
			"desc" => "Enter your custom header teaser text here",
			"id" => "teaser_custom",
			"std" => null,
			"type" => "textarea",
			"size" => "70",
			'selected' => "customtext",
			"selected_id" => "id=\"customtext\"",
			"selected_class" => "class=\"selected_teaser_customtext\"",
			"selected_option" => "header_teaser"),
			
		array(	"name" => "Twitter Username",
			"desc" => "Enter your Twitter username here",
			"id" => "twitter_id",
			"std" => null,
			"type" => "text",
			"size" => "70",
			'selected' => "twitter",
			"selected_id" => "id=\"selected_twitter\"",
			"selected_class" => "class=\"selected_teaser_twitter\"",
			"selected_option" => "header_teaser"),
			
			
		array(	"name" => "Header Teaser Style",
			"desc" =>
				array( "Framed" => "framed",
					   "Minimal" => "minimal"),
			"id" => "teaser_style",
			"std" => "framed",
			"type" => "radio"),
					
		array(	"name" => "Disable Cufon?",
			"desc" => "Check this box to disable the Cufon font replacement plugin",
			"id" => "cufon_disable",
			"std" => null,
			"type" => "checkbox"),
			
		array(	"name" => "Disable Breadcrumbs?",
			"desc" => "Check this box to disable Breadcrumb navigation",
			"id" => "breadcrumb_disable",
			"std" => null,
			"type" => "checkbox"),
			
		array(	"name" => "Google Analytics Account ID",
			"desc" => "Find the Account ID, starting with UA- in your account overview",
			"id" => "analytics_code",
			"std" => null,
			"type" => "text"),
			
		array(	"type" => "table_close"),
		
		array(	"type" => "submit"),
		
		array(	"type" => "closetab"),
		
		
		/* ***************************************** Homepage Setting Options */
		array(	"name" => "Homepage Settings",
			"id" => "homepage",
			"type" => "opentab"),

		array(	"type" => "table_open"),

		array(	"name" => "Homepage Teaser Text",
			"desc" => "Enter your homepage teaser text here",
			"id" => "homepage_teaser_text",
			"std" => null,
			"type" => "text",
			"size" => "70"),

		array(	"name" => "Disable Homepage Teaser Text?",
			"desc" => "Check this box to disable the homepage teaser text",
			"id" => "home_teaser_disable",
			"std" => null,
			"type" => "checkbox"),

		array(	"name" => "Homepage Teaser Button Link?",
			"desc" =>
				array( "Existing page" => "page",
						"Custom link" => "custom"),
			"id" => "teaser_button",
			"std" => "page",
			"type" => "radio",
			'selector' => "selector_button"),

		array(	"name" => "",
			"desc" => "Select the page that the homepage teaser button links to",
			"id" => "teaser_button_page",
			"std" => null,
			"type" => "select",
			"options" => 'pages_list',
			'selected' => "page",
			"selected_id" => "id=\"selected_button\"",
			"selected_class" => "class=\"selected_page\"",
			"selected_option" => "teaser_button"),

		array(	"name" => "",
			"desc" => "Enter the full URL that the homepage teaser button links to",
			"id" => "teaser_button_custom",
			"std" => null,
			"type" => "text",
			"size" => "70",
			'selected' => "custom",
			"selected_id" => "id=\"selected_button\"",
			"selected_class" => "class=\"selected_custom\"",
			"selected_option" => "teaser_button"),
			
		array(	"name" => "Homepage Teaser Button Text",
			"desc" => "Enter the text you'd like to appear in the homepage teaser button",
			"id" => "teaser_button_text",
			"std" => 'Learn More',
			"type" => "text",
			"size" => "70"),

		array(	"name" => "Disable Homepage Teaser Button?",
			"desc" => "Check this box to disable the homepage teaser button",
			"id" => "action_button_disable",
			"std" => null,
			"type" => "checkbox"),

		array(	"name" => "Disable Slider?",
			"desc" => "Check this box to disable the homepage slider",
			"id" => "home_slider_disable",
			"std" => null,
			"type" => "checkbox"),

		array(	"name" => "Display Blog Posts on Homepage?",
			"desc" => "Check this box to display blog posts on the homepage",
			"id" => "frontpage_blog",
			"std" => null,
			"type" => "checkbox"),

		array(	"name" => "Homepage Content Area",
			"desc" => "Select a page to import into homepage content area",
			"id" => "mainpage_content",
			"std" => null,
			"type" => "select",
			"options" => 'pages_list'),

		array(	"type" => "table_close"),

		array(	"name" => "Homepage Content Editor<span style=\"color:#222222;font-size: 13px;font-style: normal;\"><br />The text you enter here will appear above all other content on the homepage</span>",
			"id" => "content",
			"std" => null,
			"type" => "frontpage_content_editor"),
			
		array(	"type" => "submit"),

		array(	"type" => "closetab"),
		
		
		/* ***************************************** Sociable Setting Options */
		array(	"name" => "Header Sociables",
			"id" => "sociable",
			"type" => "opentab"),
			
		array(	"name" => "Twitter",
			"type" => "title_h3"),
		
		array(	"name" => "Twitter Username",
			"desc" => "Enter your Twitter username here",
			"id" => "twitter_sociable",
			"std" => null,
			"type" => "text",
			"size" => "70"),
		
		array(	"name" => "Disable Twitter Icon",
			"desc" => "Check to disable the Twitter icon",
			"id" => "twitter_sociable_disable",
			"std" => null,
			"type" => "checkbox"),

		array(	"type" => "table_close"),
	
		array(	"name" => "Facebook",
			"type" => "title_h3"),

		array(	"name" => "Facebook ID",
			"desc" => "Enter your Facebook ID here",
			"id" => "facebook_sociable",
			"type" => "text",
			"size" => "70"),
		
		array(	"name" => "Disable Facebook Icon",
			"desc" => "Check to disable the Facebook icon",
			"id" => "facebook_sociable_disable",
			"std" => null,
			"type" => "checkbox"),

		array(	"type" => "table_close"),
		
		array(	"name" => "LinkedIn",
			"type" => "title_h3"),

		array(	"name" => "LinkedIn URL",
			"desc" => "Enter your LinkedIn directory URL here",
			"id" => "linkedin_sociable",
			"type" => "text",
			"size" => "70"),
		
		array(	"name" => "Disable LinkedIn Icon",
			"desc" => "Check to disable the LinkedIn icon",
			"id" => "linkedin_sociable_disable",
			"std" => null,
			"type" => "checkbox"),

		array(	"type" => "table_close"),	
		
		array(	"name" => "MySpace",
			"type" => "title_h3"),

		array(	"name" => "MySpace ID",
			"desc" => "Enter your MySpace ID here",
			"id" => "myspace_sociable",
			"type" => "text",
			"size" => "70"),
		
		array(	"name" => "Disable MySpace Icon",
			"desc" => "Check to disable the MySpace icon",
			"id" => "myspace_sociable_disable",
			"std" => null,
			"type" => "checkbox"),

		array(	"type" => "table_close"),
		
		array(	"name" => "Delicious",
			"type" => "title_h3"),

		array(	"name" => "Delicious ID",
			"desc" => "Enter your Delicious ID here",
			"id" => "delicious_sociable",
			"type" => "text",
			"size" => "70"),
		
		array(	"name" => "Disable Delicious Icon",
			"desc" => "Check to disable the Delicious icon",
			"id" => "delicious_sociable_disable",
			"std" => null,
			"type" => "checkbox"),

		array(	"type" => "table_close"),
			
		array(	"name" => "Email",
			"type" => "title_h3"),

		array(	"name" => "Email Address",
			"desc" => "Enter your email address here",
			"id" => "email_sociable",
			"std" => null,
			"type" => "text",
			"size" => "70"),
						
		array(	"name" => "Disable Email Icon",
			"desc" => "Check to disable the Email icon",
			"id" => "email_sociable_disable",
			"std" => null,
			"type" => "checkbox"),

		array(	"type" => "table_close"),
		
		array(	"name" => "RSS",
			"type" => "title_h3"),

		array(	"name" => "Feedburner RSS URL",
			"desc" => "Enter your Feedburner URL here (leave this field blank to use WordPress's built-in feed)<br /><em>" .get_bloginfo('rss2_url'). "</em>",
			"id" => "rss_sociable",
			"type" => "text",
			"size" => "70"),
						
		array(	"name" => "Disable RSS Icon",
			"desc" => "Check to disable the RSS icon",
			"id" => "rss_sociable_disable",
			"std" => null,
			"type" => "checkbox"),

		array(	"type" => "table_close"),
		
		array(	"name" => "Custom Sociable 1",
			"type" => "title_h3"),

		array(	"name" => "Custom Sociable 1 URL",
			"desc" => "Enter your custom sociable URL here",
			"id" => "custom_1_sociable",
			"type" => "text",
			"size" => "70"),
		
		array(	"name" => "Custom Icon 1 Image Path",
			"desc" => "Enter the full URL path to your custom sociable icon here",
			"id" => "custom_1_img_sociable",
			"type" => "text",
			"size" => "70"),

		array(	"type" => "table_close"),
		
		array(	"name" => "Custom Sociable 2",
			"type" => "title_h3"),

		array(	"name" => "Custom Sociable 2 URL",
			"desc" => "Enter your custom sociable URL here",
			"id" => "custom_2_sociable",
			"type" => "text",
			"size" => "70"),
		
		array(	"name" => "Custom Icon 2 Image Path",
			"desc" => "Enter the full URL path to your custom sociable icon here",
			"id" => "custom_2_img_sociable",
			"type" => "text",
			"size" => "70"),

		array(	"type" => "table_close"),
		
		array(	"type" => "submit"),

		array(	"type" => "closetab"),
		
		
		/* ***************************************** Slider Setting Options */
		array(	"name" => "Slider Settings",
			"id" => "slidersetting",
			"type" => "opentab"),
		
		array(	"type" => "table_open"),

		array(	"name" => "Slider Type",
			"desc" =>
				array( "Fading slider" => "fading", 
						"Tabbed slider" => "tabbed"),
			"id" => "homepage_slider",
			"std" => "fading",
			"type" => "radio",
			'selector' => "selector"),
			
		array(	"name" => "Slider Autorotation",
			"desc" =>
				array( "Autorotation on" => "true", 
						"Autorotation off" => "false"),
			"id" => "slider_disable",
			"std" => "true",
			"type" => "radio"),
			
		array(	"name" => "Slider Transition Speed",
			"desc" => "Enter transition time for slider in milliseconds (1 Second = 1000 milliseconds)<br /> Default is 5000 milliseconds",
			"id" => "slider_speed",
			"std" => "5000",
			"type" => "text",
			"size" => "13"),

		array(	"type" => "table_close"),

		array(	"type" => "table_open"),
			
		array(	"type" => "table_close"),
		
		array(	"name" => "Slider Image Source",
			"type" => "title_h3"),

		array(	"name" => "Homepage Image Slider Source",
			"desc" =>
				array( "Custom define the images that the slider uses" => "custom", 
						"Use post categories" => "categories"),
			"id" => "homepage_slider_source",
			"std" => "custom",
			"type" => "radio",
			'selector' => "selector_source"),

		array(	"type" => "table_close"),
		
		array(	"type" => "slider_source",
			"class" => "categories"),

		array(	"type" => "table_open"),

		array(  "name" => "Select the post categories that will populate the image slider",
			"desc" => "The post categories here will populate the image slider",
			"id" => "slider_showcats",
			"std" => null,
			"type" => "exclude_include_checkbox",
			"options" => 'webtreats_categories'),

		array(  "name" => "Enter the number of slider images to display",
			"desc" => "Enter the number of slider images to display (default is 5)",
			"id" => "slider_count",
			"std" => "5",
			"type" => "text",
			"size" => "4"),

		array(	"type" => "table_close"),
		
		array(	"type" => "slider_close"),
		
		array(	"type" => "slider_source",
			"class" => "custom",
			"std" => true),

		array(	"name" => "Fading Slider",
			"id" => "fading_slider",
			"std" => null,
			"type" => "slider",
			'selected' => "fading"),
			
		array(	"name" => "Tabbed Slider",
			"id" => "tabbed_slider",
			"std" => null,
			"type" => "slider",
			'selected' => "tabbed"),
			
		array(	"type" => "slider_close"),

		array(	"type" => "submit"),

		array(	"type" => "closetab"),
		
		
		/* ***************************************** Blog Setting Options */
		array(	"name" => "Blog Settings",
			"id" => "blog",
			"type" => "opentab"),
			
		array(	"type" => "table_open"),
			
		array(	"name" => "Blog Page",
			"desc" => "The page you choose here will display the blog",
			"id" => "blog_page",
			"type" => "select",
			"std" => null,
			"options" => 'pages_list'),
			
		array(	"name" => "Display Full Blog Posts or Display Excerpt?",
			"desc" =>
				array( "Display excerpt" => "",
					   "Display full" => "1"), 
						
			"id" => "custom_use_more_quicktag",
			"std" => null,
			"type" => "radio"),
			
		array(  "name" => "Exclude Categories",
			"desc" => "The blog page displays all categories, since sometimes you want to exclude some of these categories (for example portfolio entries) you can exclude multiple categories here",
			"id" => "blog_excludecats",
			"std" => null,
			"type" => "exclude_include_checkbox",
			"options" => 'webtreats_categories'),
			
		array(	"name" => "Disable Related &amp; Popular Post Module?",
			"desc" => "Check this box to disable the related &amp; popular post module",
			"id" => "related_popular_posts",
			"std" => null,
			"type" => "checkbox"),

		array(	"name" => "Disable Social Bookmarks?",
			"desc" => "Check this to disable the social bookmarks module",
			"id" => "social_bookmarks",
			"std" => null,
			"type" => "checkbox"),

		array(	"name" => "Disable About Author Box?",
			"desc" => "Check this box to disable the about author box module",
			"id" => "about_author",
			"std" => null,
			"type" => "checkbox"),
			
		array(	"type" => "table_close"),
		
		array(	"name" => "<br />bit.ly API URL shorting (optional)<br /><span style=\"font-size: 11px;font-weight:normal;\">You can choose to automatically have your post URL shortened for the links posted in the social bookmarks module</span>",
			"type" => "title_h3"),
			
		array(	"name" => "Enable bit.ly API URL shorting",
			"desc" => "Check this box if you want to enable URL shorting",
			"id" => "enable_bitly",
			"std" => null,
			"type" => "checkbox"),
		
		array(	"name" => "bit.ly login",
			"desc" => "Enter your bit.ly login id here",
			"id" => "bitly_login",
			"std" => null,
			"type" => "text",
			"size" => "70"),
			
		array(	"name" => "bit.ly API key",
			"desc" => "Enter your bit.ly API key here",
			"id" => "bitly_api",
			"std" => null,
			"type" => "text",
			"size" => "70"),

		array(	"type" => "table_close"),
		
		array(	"type" => "submit"),
	
		array(	"type" => "closetab"),
		
		
		/* ***************************************** Sidebar Setting Options */
		array(	"name" => "Add Sidebars",
			"id" => "sidebar",
			"type" => "opentab"),
			
		array(	"type" => "table_open"),
		
		array(	"name" => "Add Sidebar",
			"desc" => "Enter the name of the new sidebar that you'd like to create",
			"id" => "sidebar_generator_0",
			"std" => null,
			"type" => "sidebar",
			"size" => "70"),
		
		array(	"type" => "table_close"),
		
		array(	"type" => "table_open"),
		
		array(	"name" => "Sidebars created",
			"desc" => "Below are the Sidebars you have created",
			"std" => null,
			"type" => "sidebar_delete"),
			
		array(	"type" => "table_close"),
		
		array(	"type" => "submit"),
		
		array(	"type" => "closetab"),
		
		
		/* ***************************************** Footer Setting Options */
		array(	"name" => "Footer Settings",
			"id" => "footersettings",
			"type" => "opentab"),
			
		array(	"type" => "table_open"),
		
		array(	"name" => "Footer Teaser Text",
			"desc" => "Enter your footer teaser text here",
			"id" => "footer_teaser_text",
			"std" => null,
			"type" => "text",
			"size" => "70"),

		array(	"name" => "Footer Column Layout",
			"desc" => "Select the number of footer columns you'd like the footer widgets displayed in",
			"id" => "footer_column",
			"std" => "6",
			"type" => "select",
			"options" => array("1", "2", "3", "4", "5", "6")),
			
		array(	"name" => "Disable Footer?",
			"desc" => "Check this box to disable the footer widgets",
			"id" => "footer_disable",
			"std" => null,
			"type" => "checkbox"),
		
		array(	"name" => "Copyright Footer Text",
			"desc" => "Enter the copyright text that you'd like to display in the footer",
			"id" => "footer_text",
			"std" => null,
			"type" => "text",
			"size" => "70"),
		
		array(	"type" => "table_close"),
		
		array(	"type" => "table_open"),
		
		array(  "name" => "Include Footer Page Links",
			"desc" => "Selected pages will show up in the footer",
			"id" => "footer_include",
			"std" => null,
			"type" => "exclude_include_checkbox",
			"options" => 'pages_list'),
		
		array(	"type" => "table_close"),
		
		array(	"type" => "submit"),
			
		array(	"type" => "closetab"),
		
		
		/* ***************************************** Menu Setting Options */
		array(	"name" => "Menu Navigation Settings",
			"id" => "navsettings",
			"type" => "opentab",
			"wp3_0" => webtreats_check_wp_version(),
			"msg" => "<p>As of WordPress 3.0 you now have much more control over your sites menu with WordPress’s new Navigation Menus feature. The Menus feature allows you to create a navigation menu of pages, categories, custom links, tags, etc. that is presented to your visitors.</p><p>The options page for WordPress's new Navigation Menus feature can be found here: <br /><a href=\"" .get_option('siteurl'). "/wp-admin/nav-menus.php\">" .get_option('siteurl'). "/wp-admin/nav-menus.php</a></p><p>The below option to exclude pages from your site menu will still function, but only if you don't have any custom menus created.</p><br /><br />"),
			
		array(	"type" => "table_open"),
		
		array(  "name" => "Excluded pages from menu",
			"desc" => "Selected pages will will not show up in the menu<br /> If you exclude a page with sub pages both will be excluded from the menu",
			"id" => "show_hide_pg",
			"std" => null,
			"type" => "exclude_include_checkbox",
			"options" => 'pages_list'),
		
		array(	"type" => "table_close"),
		
		array(	"type" => "submit"),
			
		array(	"type" => "closetab"),

);

?>